home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
asmsrc
/
mischards.lha
/
SourceCode
/
RaveSyndrome2.s
< prev
Wrap
Text File
|
1980-02-20
|
16KB
|
892 lines
RVS1
Opt c-
Section "RaveSyndrome2 Code",Code_c
IncDir Df0:
Start Movem.l d0-d7/a0-a6,-(sp)
Bsr KillSys
Lea OldLevel2(pc),a0
Lea Level2Int(pc),a1
Move.l $68,(a0)
Move.l a1,$68
Lea OldLevel3(pc),a0
Lea Level3Int(pc),a1
Move.l $6c,(a0)
Move.l a1,$6c
Bsr SetCycle
Lea CopperList(pc),a0
Lea HardWare,a6
Move.l a0,Cop1Lc(a6)
Move.w #$83c0,DMACon(a6)
Move.l GridBuffer(pc),a0
Lea CopperList(pc),a1
Bsr GridSeg+$20
Move.l DynaBuffer(pc),a0
Bsr DynaShape+$20
Move.w #$c028,IntEna(a6)
Loop Lea ScreenLoad(pc),a0
Moveq #0,d0
Move.w (a0),d0
Cmpi.w #-1,d0
Beq NoPicLoad
Bsr LoadPiccy
NoPicLoad Btst #6,$Bfe001
Bne Loop
Lea VisionMode(pc),a0
Move.w #0,(a0)
Bsr ExpungeAll
Bsr SysWait
Lea VisionMode(pc),a0
Move.w #0,(a0)
Bsr ExpungeAll
Bsr ReturnSys
Movem.l (sp)+,d0-d7/a0-a6
Moveq #0,d0
Rts
LoadPiccy Lea MFMBufferPt(pc),a0
Move.l (a0),a2
Lea FileBufferPt(pc),a0
Move.l (a0),a1
Add.l d0,d0
Lea Fn(pc),a3
Moveq #0,d3
Lea FileNameList(pc),a4
Move.w (a4,d0),d3
Add.l d3,a3
Lea FileNameBase(pc),a0
GetFileName Move.b (a3)+,d0
Cmpi.b #-1,d0
Beq EndFileName
Move.b d0,(a0)+
Bra GetFileName
EndFileName Lea FileNameBase(pc),a0
Movem.l d0-d7/a0-a6,-(sp)
Bsr FileLoad
Movem.l (sp)+,d0-d7/a0-a6
Lea ScrBufferLock(pc),a2
Moveq #0,d1
Move.w (a2),d1
Add.w #1,d1
And.w #3,d1
Move.w d1,(a2)
Lea ScrBuffer1-4(pc),a3
Add.l d1,d1
Add.l d1,d1
Move.l (a3,d1),a1
Lea Screen(pc),a4
Move.l a1,(a4)
Lea FileBufferPt(pc),a0
Move.l (a0),a0
Bsr DecrunchIFF+$20
Lea ScreenLoad(pc),a0
Move.w #-1,(a0)
SetNewPiccy Move.l Screen(pc),d0
Subq #2,d0
Lea CopperBPLS(pc),a0
Bsr SetBPLS
Rts
SetBPLS Move.w #4,d7
SetBPs Move.l d0,d1
Move.w d1,6(a0)
Swap d1
Move.w d1,2(a0)
Add.l #$2c00,d0
Add.l #8,a0
Dbf d7,SetBPs
Rts
ProcessStrobe Lea StrobeType(pc),a0
Move.w (a0),d0
Beq NoStrobe
Cmpi.w #1,d0
Beq ProcStrobe1
Cmpi.w #2,d0
Beq ProcStrobe2
NoStrobe Rts
ProcStrobe1 Move.w 2(a0),d0
Sub.w #1,d0
Beq EndStrobe
Move.w d0,2(a0)
Lea CopperColsPt(pc),a0
Move.l (a0),a0
Move.w #31,d7
StrobeColLoop Move.w #$fff,(a0)
Addq #4,a0
Dbf d7,StrobeColLoop
Rts
ProcStrobe2 Move.w 2(a0),d0
Sub.w #1,d0
Beq EndStrobe
Move.w d0,2(a0)
And.w #$f,d0
Move.w d0,d1
Asl.w #4,d0
Or.w d1,d0
Asl.w #4,d0
Or.w d1,d0
Lea CopperColsPt(pc),a0
Move.l (a0),a0
Move.w #31,d7
StrobeColLoop1 Move.w d0,(a0)
Addq #4,a0
Dbf d7,StrobeColLoop1
Rts
EndStrobe Move.l #0,(a0)
Rts
Level2Int Movem.l d0-d7/a0-a6,-(sp)
Btst #3,$Bfed01
Beq RetExc2
Bsr GetKey
RetExc2 Movem.l (sp)+,d0-d7/a0-a6
Move.w #$8,$Dff09c
Rte
Level3Int Movem.l d0-d7/a0-a6,-(sp)
Move.w $Dff01e,d0
Btst #5,d0
Beq RetExc3
Bsr ProcessStrobe
Bsr Cycle
Bsr EnCycle
Bsr ProcessVision
RetExc3 Movem.l (sp)+,d0-d7/a0-a6
Move.w #$20,$Dff09c
Rte
GetKey Move.b #$50,$Bfee01
Move.b #$10,$Bfee01
Moveq #0,d0
Move.b $Bfec01,d0
Ror.b #1,d0
Not.b d0
GetK Move.b d0,d4
Bclr #7,d0
Lea KeyBoardTab(pc),a0
NextSpec Move.l (a0)+,d2
Move.l (a0)+,d1
Move.l (a0)+,a1
Cmpi.l #-1,d1
Beq EndSpecTab
Cmp.b d0,d1
Beq FoundSpec
Bra NextSpec
FoundSpec Lea KeyUpTest(pc),a2
Move.w d4,(a2)
Cmpi.b #1,d2
Beq NoTstB
Btst #7,d4
Bne EndSpecTab
NoTstB Lea Pc(pc),a0
Add.l a0,a1
Jmp (a1)
EndSpecTab Rts
KillSys Bsr.s SysWait
Move.l $4,a6
Lea GFXName(pc),a1
Moveq #0,d0
Jsr -552(a6)
Lea OldCop1(pc),a5
Move.l $26(a0),$0(a5)
Move.l $32(a0),$4(a5)
Lea HardWare,a6
Move.w IntEnaR(a6),d0
Move.w DMAConR(a6),d1
Or.w #$8000,d0
And.w #$03ff,d1
Or.w #$8000,d1
Move.w d0,$8(a5)
Move.w d1,$a(a5)
Move.w #$7fff,IntEna(a6)
Move.w #$7fff,DMACon(a6)
Rts
SysWait Move.w #15,d7
SysWaitLoop Move.l #$05000,d1
Bsr.s WaitVBL
Bsr.s DoWaitVBL
Dbf d7,SysWaitLoop
Rts
DoWaitVBL Move.l #$03000,d1
WaitVBL Movem.l d0-d1/a6,-(sp)
Lea HardWare,a6
WaitVBLLoop Move.l VPosR(a6),d0
And.l #$1ff00,d0
Cmp.l d1,d0
Bne.s WaitVBLLoop
Movem.l (sp)+,d0-d1/a6
Rts
ReturnSys Lea HardWare,a6
Move.w #$7fff,IntEna(a6)
Move.w #$7fff,DMACon(a6)
Move.w OldIntEna(pc),IntEna(a6)
Move.w OldDMACon(pc),DMACon(a6)
Move.l OldCop1(pc),Cop1lc(a6)
Move.l OldCop2(pc),Cop2lc(a6)
Move.l OldLevel2(pc),$68
Move.l OldLevel3(pc),$6c
Rts
SetCycle Lea CycleList1(pc),a0
Lea CycleStart(pc),a1
Lea CopperColsPt(pc),a2
Lea CopperCols+2(pc),a3
Lea CyclePos(pc),a4
Move.l a0,(a1)
Move.l a3,(a2)
Move.l #0,(a4)
Lea CycleList1(pc),a0
Lea EnCycleStart(pc),a1
Lea EnCyclePos(pc),a4
Move.l a0,(a1)
Move.l #0,(a4)
Cycle Move.w StrobeType(pc),d0
Bne NoCycle
Move.l CopperColsPt(pc),a0
DoCycle Move.l CycleStart(pc),a1
Moveq #0,d0
Lea CyclePos(pc),a5
Move.w (a5),d0
Add.w #1,(a5)
Asl.w #1,d0
Add.l d0,a1
Move.w (a1)+,d0
Cmpi.w #$ffff,d0
Bne NotTabEnd
Move.l #0,(a5)
Bra DoCycle
NotTabEnd Move.w #31,d7
DoColoCyc Move.w d0,(a0)
Add.l #4,a0
RedooC Move.w (a1)+,d0
Cmpi.w #$ffff,d0
Bne NotColoL
Move.l CycleStart(pc),a1
Bra RedooC
NotColoL Dbf d7,DoColoCyc
NoCycle Rts
EnCycle Move.w FifthColMode(pc),d0
Cmpi.w #0,d0
Beq EnNoCycle
Move.l CopperColsPt(pc),a0
Add.l #(16*4),a0
EnDoCycle Move.l EnCycleStart(pc),a1
Moveq #0,d0
Lea EnCyclePos(pc),a5
Move.w (a5),d0
Add.w #1,(a5)
Asl.w #1,d0
Add.l d0,a1
Move.w (a1)+,d0
Cmpi.w #$ffff,d0
Bne EnNotTabEnd
Move.l #0,(a5)
Bra EnDoCycle
EnNotTabEnd Move.w #15,d7
EnDoColoCyc Move.w d0,(a0)
Add.l #4,a0
EnRedooC Move.w (a1)+,d0
Cmpi.w #$ffff,d0
Bne EnNotColoL
Move.l EnCycleStart(pc),a1
Bra EnRedooC
EnNotColoL Dbf d7,EnDoColoCyc
EnNoCycle Rts
ProcessVision Lea VisionMode(pc),a0
Cmpi.w #0,(a0)
Beq NoVision
Cmpi.w #1,(a0)
Beq CallGridVBL
Cmpi.w #2,(a0)
Beq CallGridVBL1
Cmpi.w #3,(a0)
Beq CallDynaVBL
NoVision Bra ExpungeAll
CallGridVBL Move.w #1,d0
Lea CopperCols(pc),a0
Bra GridSeg+$22
CallGridVBL1 Move.w #0,d0
Lea CopperCols(pc),a0
Bra GridSeg+$22
CallDynaVBL Lea FifthColMode(pc),a0
Cmpi.w #0,0(a0)
Beq NoFifthCol
Cmpi.w #2,0(a0)
Beq SwipeCols
NoFifthCol Bra DynaShape+$24
SwipeCols Lea CopperCols+(16*4)+2(pc),a0
Move.w (a0),d0
Moveq #15,d7
SwipeLoop Move.w d0,(a0)
Addq #4,a0
Dbf d7,SwipeLoop
Bra NoFifthCol
SLoad Macro
Moveq #\1,d0
Bra SetLoadPic
EndM
SCyc Macro
Moveq #\1,d0
Bra SetNewCycle
EndM
Pc
SLPic0 SLoad 0
SLPic1 SLoad 1
SLPic2 SLoad 2
SLPic3 SLoad 3
SLPic4 SLoad 4
SLPic5 SLoad 5
SLPic6 SLoad 6
SLPic7 SLoad 7
SLPic8 SLoad 8
SLPic9 SLoad 9
SLPic10 SLoad 10
SLPic11 SLoad 11
SLPic12 SLoad 12
SLPic13 SLoad 13
SLPic14 SLoad 14
SLPic15 SLoad 15
DoCyc1 SCyc 0
DoCyc2 SCyc 1
DoCyc3 SCyc 2
DoCyc4 SCyc 3
DoCyc5 SCyc 4
DoCyc6 SCyc 5
DoCyc7 SCyc 6
DoCyc8 SCyc 7
DoCyc9 SCyc 8
DoCyc10 SCyc 9
DoCyc11 SCyc 10
DoCyc12 SCyc 11
DoCyc13 SCyc 12
DoCyc14 SCyc 13
DoCyc15 SCyc 14
DoCyc16 SCyc 15
DoEnCyc Lea KeyUpTest(pc),a0
Lea EnCyc2(pc),a1
Move.w (a0),d0
Btst #7,d0
Beq SettingEnUp
Move.w #0,(a1)
Rts
SettingEnUp Move.w #-1,(a1)
Rts
SetBuff1 Lea ScrBuffer0(pc),a0
Bra SetNewBuffer
SetBuff2 Lea ScrBuffer1(pc),a0
Bra SetNewBuffer
SetBuff3 Lea ScrBuffer2(pc),a0
Bra SetNewBuffer
SetBuff4 Lea ScrBuffer3(pc),a0
Bra SetNewBuffer
SetNewBuffer Lea Screen(pc),a1
Move.l (a0),(a1)
Bra SetNewPiccy
SetLoadPic Lea ScreenLoad(pc),a0
Move.w d0,(a0)
Rts
SetNewCycle Lea CycleTab(pc),a0
Lea Cyc(pc),a1
Lea EnCyc2(pc),a2
Moveq #0,d1
Move.w d0,d1
Add.l d1,d1
Move.w (a0,d1.l),d1
Add.l d1,a1
Cmp.w #0,(a2)
Beq SetNormCyc
Lea EnCyclePos(pc),a0
Move.l #0,0(a0)
Move.l a1,4(a0)
Rts
SetNormCyc Lea CyclePos(pc),a0
Move.l #0,0(a0)
Move.l a1,4(a0)
Rts
DoStrobe1 Lea StrobeType(pc),a0
Move.w #1,0(a0)
Move.w #5,2(a0)
Rts
DoStrobe2 Lea StrobeType(pc),a0
Move.w #2,0(a0)
Move.w #16,2(a0)
Rts
SetGridder Lea VisionMode(pc),a0
Move.w #1,(a0)
Lea FifthColMode(pc),a0
Move.w #0,(a0)
Rts
SetGridder1 Lea VisionMode(pc),a0
Move.w #2,(a0)
Lea FifthColMode(pc),a0
Move.w #0,(a0)
Rts
SetDynaShape1 Lea FifthColMode(pc),a0
Move.w #0,(a0)
Bra SetDynaShape
SetDynaShape2 Lea FifthColMode(pc),a0
Move.w #1,(a0)
Bra SetDynaShape
SetDynaShape3 Lea FifthColMode(pc),a0
Move.w #2,(a0)
SetDynaShape Lea VisionMode(pc),a0
Move.w #3,(a0)
Bsr ExpungeAll
Lea CopperBPLS+(4*8)(pc),a0
Bsr DynaShape+$22
Rts
SetMode0 Lea VisionMode(pc),a0
Move.w #0,(a0)
Lea FifthColMode(pc),a0
Move.w #0,(a0)
Bsr SetNewPiccy
Bra ExpungeAll
ExpungeAll Bra GridSeg+$24
GFXName Dc.b "graphics.library",0
Even
OldCop1 Dc.l 0
OldCop2 Dc.l 0
OldIntEna Dc.w 0
OldDmaCon Dc.w 0
OldLevel2 Dc.l 0
OldLevel3 Dc.l 0
KeyUpTest Dc.w 0
Screen Dc.l $70000
ScreenLoad Dc.w -1
ScrBufferLock Dc.w 1
ScrBuffer0 Dc.l $72300
ScrBuffer1 Dc.l $64700
ScrBuffer2 Dc.l $56b00
ScrBuffer3 Dc.l $48f00
MFMBufferPt Dc.l $3e800
FileBufferPt Dc.l $2e800
FileNamePt Dc.l 0
GridBuffer Dc.l $52480
DynaBuffer Dc.l $70000
CyclePos Dc.l 0
CycleStart Dc.l 0
EnCyclePos Dc.l 0
EnCycleStart Dc.l 0
CopperColsPt Dc.l 0
StrobeType Dc.w 0
StrobeCount Dc.w 0
VisionMode Dc.w 0
GridOnLast Dc.w 0
FifthColMode Dc.w 0
FifthColour Dc.w $fff
EnCyc2 Dc.w 0
FileNameBase Dc.l 0,0,0,0,0,0,0,0,0,0,0,0
Fn
FileName1 Dc.b "Df1:Cyc1.IFF",0,-1
FileName2 Dc.b "Df1:Cyc2.IFF",0,-1
FileName3 Dc.b "Df1:Cyc3.IFF",0,-1
FileName4 Dc.b "Df1:Cyc4.IFF",0,-1
FileName5 Dc.b "Df1:Cyc5.IFF",0,-1
FileName6 Dc.b "Df1:Cyc6.IFF",0,-1
FileName7 Dc.b "Df1:Cyc7.IFF",0,-1
FileName8 Dc.b "Df1:Cyc8.IFF",0,-1
FileName9 Dc.b "Df1:Cyc9.IFF",0,-1
FileName10 Dc.b "Df1:Cyc10.IFF",0,-1
FileName11 Dc.b "Df1:Cyc11.IFF",0,-1
FileName12 Dc.b "Df1:Cyc12.IFF",0,-1
FileName13 Dc.b "Df1:Cyc13.IFF",0,-1
FileName14 Dc.b "Df1:Cyc14.IFF",0,-1
FileName15 Dc.b "Df1:Cyc15.IFF",0,-1
FileName16 Dc.b "Df1:Cyc16.IFF",0,-1
Even
FileNameList Dc.w FileName1-Fn,FileName2-Fn,FileName3-Fn,FileName4-Fn
Dc.w FileName5-Fn,FileName6-Fn,FileName7-Fn,FileName8-Fn
Dc.w FileName9-Fn,FileName10-Fn,FileName11-Fn,FileName12-Fn
Dc.w FileName13-Fn,FileName14-Fn,FileName15-Fn,FileName16-Fn
Dc.w -1,-1
KeyBoardTab Dc.l 0,$31,SLPic0-Pc,0,$32,SLPic1-Pc
Dc.l 0,$33,SLPic2-Pc,0,$34,SLPic3-Pc
Dc.l 0,$35,SLPic4-Pc,0,$36,SLPic5-Pc
Dc.l 0,$37,SLPic6-Pc,0,$38,SLPic7-Pc
Dc.l 0,$39,SLPic8-Pc,0,$3a,SLPic9-Pc
Dc.l 0,$20,SLPic10-Pc,0,$21,SLPic11-Pc
Dc.l 0,$22,SLPic12-Pc,0,$23,SLPic13-Pc
Dc.l 0,$24,SLPic14-Pc,0,$25,SLPic15-Pc
Dc.l 0,$5a,DoCyc1-Pc,0,$5b,DoCyc2-Pc
Dc.l 0,$5c,DoCyc3-Pc,0,$5d,DoCyc4-Pc
Dc.l 0,$3d,DoCyc5-Pc,0,$3e,DoCyc6-Pc
Dc.l 0,$3f,DoCyc7-Pc,0,$4a,DoCyc8-Pc
Dc.l 0,$2d,DoCyc9-Pc,0,$2e,DoCyc10-Pc
Dc.l 0,$2f,DoCyc11-Pc,0,$5e,DoCyc12-Pc
Dc.l 0,$1d,DoCyc13-Pc,0,$1e,DoCyc14-Pc
Dc.l 0,$1f,DoCyc15-Pc,0,$43,DoCyc16-Pc
Dc.l 0,$4f,SetBuff1-Pc,0,$4c,SetBuff2-Pc
Dc.l 0,$4d,SetBuff3-Pc,0,$4e,SetBuff4-Pc
Dc.l 0,$46,DoStrobe1-Pc,0,$5f,DoStrobe2-Pc
Dc.l 0,$50,SetGridder-Pc,0,$45,SetMode0-Pc
Dc.l 0,$51,SetGridder1-Pc
Dc.l 0,$52,SetDynaShape1-Pc,0,$53,SetDynaShape2-Pc,0,$54,SetDynaShape3-Pc
Dc.l 1,$3c,DoEnCyc-Pc
Dc.l -1,-1
CycleTab
Dc.w CycleList1-Cyc,CycleList2-Cyc
Dc.w CycleList3-Cyc,CycleList4-Cyc
Dc.w CycleList5-Cyc,CycleList6-Cyc
Dc.w CycleList7-Cyc,CycleList8-Cyc
Dc.w CycleList9-Cyc,CycleList10-Cyc
Dc.w CycleList11-Cyc,CycleList12-Cyc
Dc.w CycleList13-Cyc,CycleList14-Cyc
Dc.w CycleList15-Cyc,CycleList16-Cyc
Dc.w -1,-1
Cyc
CycleList1 Dc.w 0,0,0,0,0,0,0,0
Dc.w $fff,$fff,$fff,$fff,$fff,$fff,$fff,$fff
Dc.w 0,0,0,0,0,0,0,0
Dc.w $fff,$fff,$fff,$fff,$fff,$fff,$fff,$fff
Dc.w -1
CycleList2 Dc.w 0,0,0,0,0,0,0,0
Dc.w 0,0,0,0,0,0,0,0
Dc.w $fff,$fff,$fff,$fff,$fff,$fff,$fff,$fff
Dc.w $fff,$fff,$fff,$fff,$fff,$fff,$fff,$fff
Dc.w -1
CycleList3 Dc.w 0,0,0,0,0,0,0,0
Dc.w 0,0,0,0,0,0,0,0
Dc.w 0,0,0,0,0,0,0,0
Dc.w 0,0,0,0,0,0,0,$fff
Dc.w -1
CycleList4 Dc.w 0,0,0,0,0,0,0,0
Dc.w 0,0,0,0,0,0,0,0
Dc.w 0,0,0,0,0,0,0,0
Dc.w 0,0,0,0,$fff,$fff,$fff,$fff
Dc.w -1
CycleList5 Dc.w $000,$111,$222,$333,$444,$555,$666,$777
Dc.w $888,$999,$aaa,$bbb,$ccc,$ddd,$eee,$fff
Dc.w $fff,$eee,$ddd,$ccc,$bbb,$aaa,$999,$888
Dc.w $777,$666,$555,$444,$333,$222,$111,$000
Dc.w -1
CycleList6 Dc.w $000,0,0,$111,0,0,$222,0,0,$333,0,0,$444,0,0,$555,0,0,$666,0,0,$777,0,0
Dc.w $888,0,0,$999,0,0,$aaa,0,0,$bbb,0,0,$ccc,0,0,$ddd,0,0,$eee,0,0,$fff,0,0
Dc.w $fff,0,0,$eee,0,0,$ddd,0,0,$ccc,0,0,$bbb,0,0,$aaa,0,0,$999,0,0,$888,0,0
Dc.w $777,0,0,$666,0,0,$555,0,0,$444,0,0,$333,0,0,$222,0,0,$111,0,0,$000,0,0
Dc.w -1
CycleList7 Dc.w 0,$fff
Dc.w -1
;Dc.w $,$,$,$,$,$,$,$
;Dc.w $,$,$,$,$,$,$,$
;Dc.w $,$,$,$,$,$,$,$
;Dc.w $,$,$,$,$,$,$,$
;Dc.w $,$,$,$,$,$,$,$
;Dc.w $,$,$,$,$,$,$,$
CycleList8 Dc.w 0,0,0,$fff,-1
CycleList9 Dc.w $f00,$0f0,$00f,-1
CycleList10 Dc.w $f00,0,0,$0f0,0,0,$00f,0,0,-1
CycleList11 Incbin SysData/Cl1
CycleList12 Incbin SysData/Cl2
CycleList13 Incbin SysData/Cl3
CycleList14 Incbin SysData/Cl4
CycleList15 Incbin SysData/Cl5
CycleList16 Incbin SysData/Cl6
Cmv Macro
Dc.w \2,\1
EndM
Cwt Macro
Dc.w (\1*$100)+$01,$fffe
EndM
Pal Macro
Dc.w $ffe1,$fffe
EndM
EndCop Macro
Dc.w $ffff,$fffe
EndM
CopperList Cwt $15
Cmv $0200,BplCon0
Cmv $0000,BplCon1
Cmv $000a,BplCon2
Cmv $0028,DdfStrt
Cmv $00d0,DdfStop
Cmv $1671,DiwStrt
Cmv $28e1,DiwStop
Cmv $0,BplMod1
Cmv $0,BplMod2
Cwt $25
CopperBPLZ Cmv $0,ECSNop
Cmv $0,ECSNop
CopperBPLS Cmv $f,BplPt0h
Cmv $2300-2,BplPt0l
Cmv $f,BplPt1h
Cmv $232c-2,BplPt1l
Cmv $f,BplPt2h
Cmv $2358-2,BplPt2l
Cmv $f,BplPt3h
Cmv $2384-2,BplPt3l
Cmv $f,BplPt4h
Cmv $23b0-2,BplPt4l
Cwt $28
Cmv $5200,BplCon0
CopperCols Cmv $0000,Color00
Cmv $0f0f,Color01
Cmv $0e1e,Color02
Cmv $0d2d,Color03
Cmv $0c3c,Color04
Cmv $0b4b,Color05
Cmv $0a5a,Color06
Cmv $0969,Color07
Cmv $0878,Color08
Cmv $0787,Color09
Cmv $0696,Color10
Cmv $05a5,Color11
Cmv $04b4,Color12
Cmv $03c3,Color13
Cmv $02d4,Color14
Cmv $01e5,Color15
Cmv $00f6,Color16
Cmv $00f7,Color17
Cmv $01f8,Color18
Cmv $02f9,Color19
Cmv $03ea,Color20
Cmv $04eb,Color21
Cmv $05dc,Color22
Cmv $06dd,Color23
Cmv $07ce,Color24
Cmv $08cf,Color25
Cmv $09be,Color26
Cmv $0abd,Color27
Cmv $0bac,Color28
Cmv $0cab,Color29
Cmv $0d9a,Color30
Cmv $0e99,Color31
Pal
Cwt $28
Cmv $0200,BplCon0
EndCop
PiccyLoad Incbin CodeSegments/PicLoad.Seg
GridSeg Incbin CodeSegments/Gridder-Seg
DecrunchIFF Incbin CodeSegments/IFFRead-Seg
FileLoad Incbin CodeSegments/FileLoad-Seg1
DynaShape Incbin CodeSegments/DynaShape-Seg
****Custom Chip Registers****
Hardware = $Dff000
;Control Registers
Dmaconr = $002
Vposr = $004
Vhposr = $006
Joy0dat = $00A
Joy1dat = $00C
Clxdat = $00E
Intenar = $01C
Intereqr = $01E
Copcon = $02E
;Blitter Registers
Bltcon0 = $040
Bltcon1 = $042
Bltafwm = $044
Bltalwm = $046
Bltcpth = $048
Bltcptl = $04A
Bltbpth = $04C
Bltbptl = $04E
Bltapth = $050
Bltaptl = $052
Bltdpth = $054
Bltdptl = $056
Bltsize = $058
Bltcmod = $060
Bltbmod = $062
Bltamod = $064
Bltdmod = $066
Bltcdat = $070
Bltbdat = $072
Bltadat = $074
;Copper Registers
Cop1lc = $080
Cop1lch = $080
Cop1lcl = $082
Cop2lc = $084
Cop2lch = $084
Cop2lcl = $086
Copjmp1 = $088
Copjmp2 = $08A
Diwstrt = $08E
Diwstop = $090
Ddfstrt = $092
Ddfstop = $094
Dmacon = $096
Clxcon = $098
Intena = $09A
Intreq = $09C
;BitPlane Registers
BplCon0 = $100
BplCon1 = $102
BplCon2 = $104
BplMod1 = $108
BplMod2 = $10a
BplPt0h = $0e0
BplPt0l = $0e2
BplPt1h = $0e4
BplPt1l = $0e6
BplPt2h = $0e8
BplPt2l = $0ea
BplPt3h = $0ec
BplPt3l = $0ee
BplPt4h = $0f0
BplPt4l = $0f2
BplPt5h = $0f4
BplPt5l = $0f6
;Colour Registers
Color00 = $180
Color01 = $182
Color02 = $184
Color03 = $186
Color04 = $188
Color05 = $18a
Color06 = $18c
Color07 = $18e
Color08 = $190
Color09 = $192
Color10 = $194
Color11 = $196
Color12 = $198
Color13 = $19a
Color14 = $19c
Color15 = $19e
Color16 = $1a0
Color17 = $1a2
Color18 = $1a4
Color19 = $1a6
Color20 = $1a8
Color21 = $1aa
Color22 = $1ac
Color23 = $1ae
Color24 = $1b0
Color25 = $1b2
Color26 = $1b4
Color27 = $1b6
Color28 = $1b8
Color29 = $1ba
Color30 = $1bc
Color31 = $1be
EcsNop = $1fe
RVS2